
<%@ page contentType="text/html;charset=UTF-8" language="java" trimDirectiveWhitespaces="true" errorPage="error.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-title" content="魔法集市">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=1200">
    <meta name="keywords" content="GSC,寿屋,万代,眼镜工厂,千值练,海洋堂,粘土人,MAXFACTORY,ALTER,良笑,三丽鸥,Sanrio,Takaratomy,KADOKAWA,Chara-ani,AmiAmi,手办自营,周边自营,谷子自营">
    <meta name="description" content="魔法集市·自营是专注于二次元的日本代购网站以及动漫周边自营零售网站，为用户提供快捷方便的游戏动漫代购，ACG周边、声优周边、同人商品及其他日系商品一应俱全，目前支持日本亚马逊、虎穴(虎之穴)、骏河屋、Book-off、C-queen(K-books)和Melonbooks(蜜瓜)等网站的代购。与此同时，魔法集市・自营整合来自日本的第一手货源，为大家精心挑选了各种热门人气商品。所有商品均从魔法集市的日本仓库打包发出，配合全新的「喵急便」物流服务直接送达您的手中，您将能获得焕然一新的消费体验">
    <link rel="icon" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
    <link rel="apple-touch-icon" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
    <link rel="apple-touch-icon-precomposed" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
    <title>${goods.goodsname} - 魔法集市</title>
    <script src="js/cars.js"></script>
    <script src="js/goodsinfo.js"></script>
    <script src="js/jquery-3.1.0.js"></script>
    <script>
        $(function () {
            $('button[action="加入购物车"]').click(function () {
                var userid = $("#user").attr("date-userid");
                if(userid!=undefined){
                    var goodsid = $("ul").attr("date-id");
                    var num = $("#num").val();
                    var i=addCars(userid,goodsid,num);
                    i.done(function (date) {
                        if(date.addCarState>0){
                            $("#tishi").html("添加成功").attr("class","ui-toast-box");
                            setTimeout(function () {$("#tishi").attr("class","ui-toast-box h");},1000);
                        }else{
                            $("#tishi").html("添加失败，请检查网络").attr("class","ui-toast-box");
                            setTimeout(function () {$("#tishi").attr("class","ui-toast-box h");},1000);
                        }
                    });
                }else{
                    $("#tishi").html("请先登录").attr("class","ui-toast-box");
                    setTimeout(function () {$("#tishi").attr("class","ui-toast-box h");location.href="login.jsp";},1000);

                }
            });
            $('button[action="立即购买"]').click(function () {
                var userid = $("#user").attr("date-userid");
                if(userid!=undefined){
                    var goodsid = $("ul").attr("date-id");
                    var num = $("#num").val();
                    location.href="confirm?goodsid="+goodsid+"&num="+num;
                }

            });

            $("#cover").mousemove(function (e) {
                var x = e.clientX-320;
                var y = e.clientY+50;
                var xy = x+"px "+y+"px";
                $("#cover").css({'transform-origin':xy});
            })
        });
    </script>
</head>
<body>
<%--插入头部--%>
<%@include file="header.jsp"%>

<%--<section>--%>
    <%--<h1>银魂 趴趴徽章收藏套装</h1>--%>
    <%--<category>角色周边</category>--%>
    <%--<time>2019-11-28</time>--%>
    <%--<article>--%>
        <%--<p>&nbsp;</p>--%>
        <%--<p><img src="http://mallpcdn.masadora.net/8a55fa34e0985db889c3b6ba9105063e003172ba/000975553_01.jpg!w1380t" /><img src="http://mallpcdn.masadora.net/8a55fa34e0985db889c3b6ba9105063e003172ba/000975553_02.jpg!w1380t" /></p></article>--%>
<%--</section>--%>
<div id="M">
    <c:choose>
        <c:when test="${goods!=null}">
    <div class="view view-product">
        <div class="bg-gray">
            <div class="ui-layout">
                <div class="view-good-info-box">
                    <div class="imgs-box" data-max="0">
                        <div class="big-cover-box">
                            <img src="${goods.img}" id="cover" style="transform-origin: 63px 509px;" />
                        </div>
                    </div>
                    <div class="info-box">
                        <h1>${goods.goodsname}</h1>
                        <p>物美价廉的好货，尽在掌握。。。。</p>
                        <div class="tags-box">
                            <span data-name="预售">预售</span>
                            <span data-name="跨境购">跨境购</span>
                        </div>
                        <ul class="info-list-box" date-id="${goods.id}">
                            <li class="info-item-box" data-key="first-price"><big data-price-key="priceFirstPhase">${goods.price}</big></li>
                            <li class="hr"></li>
                            <%--<li class="info-item-box" data-key="status"><span>商品状态</span></li>--%>
                            <%--<li class="info-item-box" data-key="explain"><span>商品说明</span></li>--%>
                            <li class="info-item-box" data-key="spec"><a href="#" data-product-code="C4UWNOZMUY" data-enable-buy="true" data-name="默认" class="active"></a></li>
                            <li class="info-item-box" data-key="number">
                                <div class="ui-input-number runing">
                                    <input id="num" name="quantity" min="1" max="99" value="1" placeholder="1" />
                                    <a onclick="reduce()" id="reduce" href="javascript:void(0);" class="reduce"></a>
                                    <a onclick="add()" href="javascript:void(0);" id="add" class="add"></a>
                                </div></li>
                        </ul>
                        <div class="ctrl-box">
                            <button class="btn big" action="加入购物车">加入购物车</button>
                            <button class="btn big stroke" action="立即购买">立即购买</button>
                        </div>
                        <div class="view-good-info-tip-store-id-1000">
                            本商品经过了站长的精心挑选，质量是有保障的，放心购买。
                        </div>
                    </div>
                </div>
                <div class="view-good-content-box">
                    <div class="goods-recommend-box"></div>
                </div>
            </div>
        </div>
    </div>
        </c:when>
        <c:otherwise>
            <h1>抱歉，我们没有找到该商品<a href="list.jsp" >点击返回商品页面</a></h1>
        </c:otherwise>
    </c:choose>
</div>
<%@include file="foot.jsp"%>
<div id="tishi" class="ui-toast-box h"></div>
<%--<script src="http://masadora-js.masadora.net/masadora_omega/static/js/build.js?_r=09632408"></script>--%>
</body>
</html>